package ar.edu.unrn.lia.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;
import javax.validation.constraints.NotNull;

@Entity
@Table(name = "tasa_interes", uniqueConstraints = @UniqueConstraint(columnNames = { "fecha" }))
public class TasaInteres extends BaseEntity implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 5195615190542667952L;

	private Date fecha;

	private Double tasa;

	public TasaInteres() {
		super();
		// TODO Auto-generated constructor stub
	}

	@Temporal(TemporalType.DATE)
	@NotNull(message = "{name.notnull}")
	@Column( name = "fecha", unique  = true)
	public Date getFecha() {
		return fecha;
	}

	public void setFecha(Date fecha) {
		this.fecha = fecha;
	}

	//@Size(min = 1, max = 100, message = "{name.size}")
	@NotNull(message = "{name.notnull}")
	public Double getTasa() {
		return tasa;
	}

	public void setTasa(Double tasa) {
		this.tasa = tasa;
	}

}
